<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>用户组管理</title>
<!--{ include file="header.html" }-->
<script language="javascript">
function goPage(){
	var page = $('#gopage').val();
	if(!page) return;
	page = parseInt(page);
	if(isNaN(page)) page = 1;
	var base_url = $('#page_url').val();
	var new_page_url = base_url + '&page=' + parseInt(page);
	window.location.href = new_page_url;
}

function enterSearchKey(inputid){
	var searchkey = $('#' + inputid).val();
	var pattern = /^--.*--$/;
	if(pattern.test(searchkey)){
		$('#' + inputid).val('');
	}
}

function checkSearchKey(inputid){
	var searchkey = $('#' + inputid).val();
	var ori_str = "";
	if(searchkey == '' && inputid == 'search_cname'){
		ori_str = "--按组名搜索--";
		$('#' + inputid).val(ori_str);
	}else if(searchkey == '' && inputid == 'search_cno'){
		ori_str = "--按组代码搜索--";
		$('#' + inputid).val(ori_str);
	}else if(searchkey == '' && inputid == 'search_pname'){
		ori_str = "--按省份名搜索--";
		$('#' + inputid).val(ori_str);
	}
}

function preSearchProcess(){
	var searchkey1 = $('#search_cname').val();
	var searchkey2 = $('#search_cno').val();
	var searchkey3 = $('#search_pname').val();
	var pattern = /^--.*--$/;
	if(pattern.test(searchkey1)){
		$('#search_cname').val('');
	}
	if(pattern.test(searchkey2)){
		$('#search_cno').val('');
	}
	if(pattern.test(searchkey3)){
		$('#search_pname').val('');
	}
	return true;
}
</script>
</head>

<body>
<div style="float:left; width:70%">
<form name="searchForm" method="post" action="./index.php?module=user&act=group" onsubmit="return preSearchProcess();">
<div style="float:left">搜索：</div>
<div style="float:left"><input class="searchinput" type="text" name="search_cname" id="search_cname" value="--按组名搜索--" onclick="enterSearchKey('search_cname');" onblur="checkSearchKey('search_cname');" /></div>
<div style="float:left"><input class="searchinput" type="text" name="search_cno" id="search_cno" value="--按组代码搜索--" onclick="enterSearchKey('search_cno');" onblur="checkSearchKey('search_cno');" /></div>
<div style="float:left"><input class="searchinput" type="text" name="search_pname" id="search_pname" value="--按省份搜索--" onclick="enterSearchKey('search_pname');" onblur="checkSearchKey('search_pname');" /></div>
<div style="float:left"><input type="submit" name="searchsubmit" value="搜索" /></div>
<input type="hidden" name="step" value="search" />
</form>
</div>
<div style="float:right"><input type="button" name="addnewcity" value="添加新组" onclick="javascript:window.location.href='./index.php?module=user&act=group&step=add';" /></div>
<br/><br/>

<table width="100%"  border="0" align="center" cellpadding="1" cellspacing="1" bgcolor="#0066FF">
<form name="batch_del" action="./index.php?module=user&act=group" method="post" onsubmit='return listTable.submitCheck(this, "checkboxes");' >
  <tr bgcolor="#96d6f8" align="center">
  <td height="20" width="5%"><input onclick='listTable.selectAll(this, "checkboxes");' type="checkbox" />全选</td>
    <td height="20" width="5%">组ID</td>
	<td width="10%">组名称</td>
	<td width="10%">组类型</td>
	<td width="10%">是否参与测试</td>
	<td width="5%">操作</td>
  </tr>
  <!--{if $arr_lists|@count }-->
  <!--{foreach name=lists from=$arr_lists item=list}-->
  <tr bgcolor="#FFFFFF" align="center">
    <td height="20" align="center" bgcolor="#FFFFFF"><input type="checkbox" name="checkboxes[]" value="<!--{ $list.UserGroupID }-->" /></td>
	<td><!--{ $list.UserGroupID }--></td>
    <td><!--{ $list.UserGroupName }--></td>
	<td><!--{ if $list.UserGroupType == 1 }-->权限用户组<!--{ elseif $list.UserGroupType == 2 }-->商业用户组<!--{ elseif $list.UserGroupType == 3 }-->等级用户组<!--{ /if }--></td>
	<td><!--{ if $list.UserBetaUpdate == 0 }-->否<!--{ elseif $list.UserBetaUpdate == 1 }-->是<!--{ /if }--></td>
	<td><a href="./index.php?module=user&act=group&step=edit&id=<!--{ $list.UserGroupID }-->">修改</a> <a href="./index.php?module=user&act=group&step=del&id=<!--{ $list.UserGroupID }-->">删除</a></td>
  </tr>
  <!--{/foreach}-->
  <!--{else}-->
  <tr bgcolor="#FFFFFF">
    <td height="20" colspan="6" bgcolor="#FFFFFF" align="center"><b><font color="#000000">没有数据！</font></b></td>
  </tr>
  <!--{/if}-->
  <tr bgcolor="#FFFFFF">
    <td height="20" colspan="6" bgcolor="#FFFFFF" align="right">
	<!--{ $pager.current_page }-->/<!--{ $pager.total_page }-->页 <a href="<!--{ $pager.first_page }-->" target="_self">首页</a> <a href="<!--{ $pager.pre_page }-->" target="_self">上一页</a> <a href="<!--{ $pager.next_page }-->" target="_self">下一页</a> <a href="<!--{ $pager.last_page }-->" target="_self">末页</a> <input type="text" name="gopage" id="gopage" value="" size="3" /> <input type="button" name="go" value="GO" onclick="goPage();" />
	<input type="hidden" name="page_url" id="page_url" value="<!--{ $pager.page_url }-->" />
	</td>
  </tr>
  <tr bgcolor="#FFFFFF" align="center">
    <td colspan="6">
	  <input type="submit" name="Submit" value="删除">
      <input type="reset" name="Submit" value="重置">
	  <input type="hidden" name="step" value="batch_del" />
    </td>
  </tr>
</form>
</table>

</body>
</html>